﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace FonShare.Classes.FTP
{
    /// <summary>
    /// A Test Class for FTPFactory class.
    /// </summary>
    /// <author>spesme</author>
    /// <since>26/06/2009</since>
    public class TestFTPFactory {

       public static void Main() 
       {
        try 
        {
            Console.WriteLine("Starting...");

            FS_FTPFactory ff = new FS_FTPFactory("111.111.111.111", "myfolder", "user", "xxx");
            ff.setDebug(true);
            ff.login();
            //ff.chdir("Disc-A1");

            //string[] fileNames = ff.getFileList("*.*");
            //for (int i=0;i < fileNames.Length;i++) 
            //{
            //  Console.WriteLine(fileNames[i]);
            //}

            ff.setBinaryMode(true);
            ff.upload(@"C:\Seb\01-IRON\09-Images\IRONSolutions_Logo.jpg");
            ff.close();
        }
        catch(Exception e) 
        {
            throw e;
            //Console.WriteLine("Caught Error :"+e.Message);
        }
       }
    }
}
